﻿using ProjectFootball.MVC.Foundation.ResourceLibrary;
using ProjectFootball.MVC.Models.EntityFramework.Entities;
using System.Security.Principal;

namespace ProjectFootball.MVC.Areas.TeamArea.Models
{
    public static class _TeamDataModelExtensions
    {
        public static TeamVersion CreateNew(this TeamDataModel dataModel, IPrincipal user, CreateType createType)
        {
            return new TeamVersion(user, createType, dataModel.ApprovalGuid, dataModel.TeamGuid, dataModel.TeamName, dataModel.CountryGuid, dataModel.VenueGuid,
                dataModel.ActiveFrom, dataModel.ActiveTo);
        }
    }
}